<?php

namespace addons\ymypaylinx\library;
use addons\ymypaylinx\library\paylinx\Alipay;
use addons\ymypaylinx\library\paylinx\Config;
use addons\ymypaylinx\library\paylinx\Verify;
use addons\ymypaylinx\library\paylinx\Wechat;

/**
 * @method static Alipay alipay(array $config) 支付宝
 * @method static Wechat wechat(array $config) 微信
 * @method static Verify verify(array $config) 校验订单
 */
class Paylinx
{

    public static function __callStatic($method, $params)
    {
        if($method == 'wechat'){
            $app = new Wechat($params);
        }elseif($method == 'alipay'){
            $app = new Alipay($params);
        }elseif($method == 'verify'){
            $app = new Verify($params);
        }
        return $app;
    }


}